﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Refit;


using MyETFData.Model;


namespace MyETFData.Service
{
    public interface IETFService
    {

        /// <summary>
        /// 获取 ETF 数据.
        /// </summary>
        /// <returns></returns>
        [Get("/etf_master")]
        Task<List<ETFInfo>> GetETFInfosAsync();


        /// <summary>
        /// 插入日线数据.
        /// (具体业务代码，是通过 postgrest 调用存储过程来完成的. )
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [Post("/rpc/insert_day_line")]
        Task<ServiceResult> InsertDayLineAsync(DayLineRequest request);
    }
}
